#!/usr/bin/env bash
# vim: fdm=marker fmr=[[[,]]] cms=\ #%s

#[[ -z $SOAR ]] && SOAR_DIR=~/work/arronbox/soar
#PATH=$PATH:$SOAR_DIR/common/bash/soar
PATH=$PATH:../../soar
. soar.sh

main()
{
    local respond=$(sn_call "localhost:10020" GETDBPASSWD DB1 dbuser)
    echo "respond: $respond"

    local curr=0
    while [[ 1 ]]
    do
        local item=$(para_get_item "$respond" $curr)
        [[ -z $item ]] && break
        echo $item
        (( curr+=$(para_item_size "$item") ))
    done
}

main $@
exit $?
